package com.ruoyi.basebill.mapper;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import com.ruoyi.basebill.domain.OmsPurinwarehsbill;
import com.ruoyi.basebill.domain.OmsPurinwarehsbillentry;
import org.apache.ibatis.annotations.Param;

/**
 * 采购入库单Mapper接口
 * 
 * @author wenyixiong
 * @date 2023-02-15
 */
public interface OmsPurinwarehsbillMapper 
{
    /**
     * 查询采购入库单
     * 
     * @param id 采购入库单主键
     * @return 采购入库单
     */
    public OmsPurinwarehsbill selectOmsPurinwarehsbillById(Long id);

    public List<OmsPurinwarehsbill> selectOmsPurinwarehsbillByIds(@Param("list") HashSet<Long> ids);

    /**
     * 查询采购入库单列表
     * 
     * @param omsPurinwarehsbill 采购入库单
     * @return 采购入库单集合
     */
    public List<OmsPurinwarehsbill> selectOmsPurinwarehsbillList(OmsPurinwarehsbill omsPurinwarehsbill);


    public List<OmsPurinwarehsbill> selectOmsPurinwarehsbillDetailList(OmsPurinwarehsbill omsPurinwarehsbill);

    /**
     * 新增采购入库单
     * 
     * @param omsPurinwarehsbill 采购入库单
     * @return 结果
     */
    public int insertOmsPurinwarehsbill(OmsPurinwarehsbill omsPurinwarehsbill);

    /**
     * 修改采购入库单
     * 
     * @param omsPurinwarehsbill 采购入库单
     * @return 结果
     */
    public int updateOmsPurinwarehsbill(OmsPurinwarehsbill omsPurinwarehsbill);

    /**
     * 删除采购入库单
     * 
     * @param id 采购入库单主键
     * @return 结果
     */
    public int deleteOmsPurinwarehsbillById(Long id);

    /**
     * 批量删除采购入库单
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOmsPurinwarehsbillByIds(Long[] ids);

    /**
     * 批量删除采购入库单明细
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOmsPurinwarehsbillentryByParentids(Long[] ids);
    
    /**
     * 批量新增采购入库单明细
     * 
     * @param omsPurinwarehsbillentryList 采购入库单明细列表
     * @return 结果
     */
    public int batchOmsPurinwarehsbillentry(List<OmsPurinwarehsbillentry> omsPurinwarehsbillentryList);
    

    /**
     * 通过采购入库单主键删除采购入库单明细信息
     * 
     * @param id 采购入库单ID
     * @return 结果
     */
    public int deleteOmsPurinwarehsbillentryByParentid(Long id);

    int updateSumBillNumberByIds(@Param("sumBillNumber") String billNumber, @Param("ids") ArrayList<Long> ids);

    List<OmsPurinwarehsbill> selectSumBillNumberIsNull();
}
